package top.starmc.starquesthelper.execute

import org.bukkit.command.CommandSender
import taboolib.common.platform.command.CommandBody
import taboolib.common.platform.command.CommandHeader
import taboolib.common.platform.command.mainCommand
import taboolib.common.platform.command.subCommand
import taboolib.expansion.createHelper
import top.starmc.starquesthelper.config.Config

@CommandHeader("StarQuestHelper", permission = "StarQuestHelper.Default")
object ExecuteHandler {
    @CommandBody
    val main = mainCommand {
        createHelper()
    }

    @CommandBody(permission = "StarQuestHelper.Reload")
    val reload = subCommand {
        execute<CommandSender> { sender, _, _ ->
            Config.loadConfig()
            sender.sendMessage("§f[§c系统§f] §c配置已重载")
        }
    }
}